#include <QObject>
#include <QDebug>

#include "common.h"

uint32_t NOTE_FACTOR[NOTE_TYPE_COUNT] = {
    10000,
    5000,
    2000,
    1000,
    500,
    100,
    50,
    10,
    1,
    0
};

QStringList NOTE_NAMES;

QString NOTE_name(uint32_t note_type_idx)
{
	if (NOTE_NAMES.length() == 0) {
		NOTE_NAMES << QObject::tr("$100");
		NOTE_NAMES << QObject::tr("$50");
		NOTE_NAMES << QObject::tr("$20");
		NOTE_NAMES << QObject::tr("$10");
		NOTE_NAMES << QObject::tr("$5");
		NOTE_NAMES << QObject::tr("$1");
		NOTE_NAMES << QObject::tr("$0.5");
		NOTE_NAMES << QObject::tr("$0.1");
		NOTE_NAMES << QObject::tr("$0.01");
		NOTE_NAMES << "";
	}
    if (note_type_idx >= NOTE_TYPE_COUNT)
		return "";
	return NOTE_NAMES[note_type_idx];
}

uint32_t NOTE_factor(uint32_t note_type_idx)
{
    if (note_type_idx >= NOTE_TYPE_COUNT)
		return 0;
	return NOTE_FACTOR[note_type_idx];
}
